#encoding=utf8
from MysqlHelper import *

sql = 'insert into students(sname,gender) values(%s,%s)'
sname = raw_input("请输入用户名：")
gender = raw_input("请输入性别，1为男，0为女：")
params = [sname,bool(gender)]

mysqlHelper = MysqlHelper('localhost',3306,'test1','root','1')
count = mysqlHelper.insert(sql,params)
if count == 1:
    print "OK"
else:
    print "error"